<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>command_line_usage - rake: Ruby Standard Library Documentation</title>


<script src="../../js/navigation.js" defer></script>
<script src="../../js/search.js" defer></script>
<script src="../../js/search_index.js" defer></script>
<script src="../../js/searcher.js" defer></script>
<script src="../../js/darkfish.js" defer></script>

<script src="../../js/jquery-3.2.0.min.js"></script>

<script src="../../js/vue.min.js"></script>
<script src="../../js/js.cookie.min.js"></script>

<link href="../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../css/rdoc.css" rel="stylesheet">
<link href="../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../";
  var index_rel_prefix = "../../";
  var darkModeCsseHref = "../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="file">
  <!-- this is page.html -->
  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->


 <div class='wrapper hdiv'>

 


<nav id='vapp' role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../table_of_contents.html#pages">Pages</a>
    <a href="../../table_of_contents.html#classes">Classes</a>
    <a href="../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  
  <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>

  <div id="project-metadata">
   <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
    
<div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
    <li><a href="../../rake-13_0_6/History_rdoc.html">History</a>
    <li><a href="../../rake-13_0_6/README_rdoc.html">README</a>
    <li><a href="../../rake-13_0_6/doc/command_line_usage_rdoc.html">command_line_usage</a>
    <li><a href="../../rake-13_0_6/doc/glossary_rdoc.html">glossary</a>
    <li><a href="../../rake-13_0_6/doc/proto_rake_rdoc.html">proto_rake</a>
    <li><a href="../../rake-13_0_6/doc/rakefile_rdoc.html">rakefile</a>
    <li><a href="../../rake-13_0_6/doc/rational_rdoc.html">rational</a>
  </ul>
</div>

   </div>
  </div>
</nav>


<!--  carbon ads here -->

<div id='extraz'>
  <div class='adzbox-index'  >
   
  </div>
 </div>         


<main role="main" aria-label="Page rake-13.0.6/doc/command_line_usage.rdoc">

<h1 id="label-Rake+Command+Line+Usage">Rake Command Line Usage<span><a href="#label-Rake+Command+Line+Usage">&para;</a> <a href="#top">&uarr;</a></span></h1>

<p>Rake is invoked from the command line using:</p>

<pre class="ruby"><span class="ruby-string">% rake </span>[<span class="ruby-identifier">options</span> <span class="ruby-operator">...</span>]  [<span class="ruby-constant">VAR</span>=<span class="ruby-constant">VALUE</span> <span class="ruby-operator">...</span>]  [<span class="ruby-identifier">targets</span> <span class="ruby-operator">...</span>]
</pre>

<p>Options are:</p>
<dl class="rdoc-list label-list"><dt><code><em>name</em>=<em>value</em></code>
<dd>
<p>Set the environment variable <em>name</em> to <em>value</em> during the execution of the <strong>rake</strong> command.  You can access the value by using ENV[‘<em>name</em>’].</p>
</dd><dt><code>--all</code> (-A)
<dd>
<p>Used in combination with the -T and -D options, will force those options to show all the tasks, even the ones without comments.</p>
</dd><dt><code>--backtrace</code>{=<em>output</em>} (-n)
<dd>
<p>Enable a full backtrace (i.e. like –trace, but without the task tracing details). The <em>output</em> parameter is optional, but if specified it controls where the backtrace output is sent. If <em>output</em> is <code>stdout</code>, then backtrace output is directed to standard output. If <em>output</em> is <code>stderr</code>, or if it is missing, then the backtrace output is sent to standard error.</p>
</dd><dt><code>--comments</code>
<dd>
<p>Used in combination with the -W options to force the output to contain commented options only. This is the reverse of <code>--all</code>.</p>
</dd><dt><code>--describe</code> <em>pattern</em> (-D)
<dd>
<p>Describe the tasks (matching optional PATTERN), then exit.</p>
</dd><dt><code>--dry-run</code> (-n)
<dd>
<p>Do a dry run.  Print the tasks invoked and executed, but do not actually execute any of the actions.</p>
</dd><dt><code>--execute</code> <em>code</em> (-e)
<dd>
<p>Execute some Ruby code and exit.</p>
</dd><dt><code>--execute-print</code> <em>code</em> (-p)
<dd>
<p>Execute some Ruby code, print the result, and exit.</p>
</dd><dt><code>--execute-continue</code> <em>code</em> (-E)
<dd>
<p>Execute some Ruby code, then continue with normal task processing.</p>
</dd><dt><code>--help</code>  (-H)
<dd>
<p>Display some help text and exit.</p>
</dd><dt><code>--jobs</code> <em>number</em>  (-j)
<dd>
<p>Specifies the maximum number of concurrent threads allowed. Rake will allocate threads as needed up to this maximum number.</p>

<p>If omitted, Rake will attempt to estimate the number of CPUs on the system and add 4 to that number.</p>

<p>The concurrent threads are used to execute the <code>multitask</code> prerequisites. Also see the <code>-m</code> option which turns all tasks into multitasks.</p>

<p>Sample values:</p>

<pre>(no -j)   : Allow up to (# of CPUs + 4) number of threads
--jobs    : Allow unlimited number of threads
--jobs=1  : Allow only one thread (the main thread)
--jobs=16 : Allow up to 16 concurrent threads</pre>
</dd><dt><code>--job-stats</code> <em>level</em>
<dd>
<p>Display job statistics at the completion of the run. By default, this will display the requested number of active threads (from the -j options) and the maximum number of threads in play at any given time.</p>

<p>If the optional <em>level</em> is <code>history</code>, then a complete trace of task history will be displayed on standard output.</p>
</dd><dt><code>--libdir</code> <em>directory</em>  (-I)
<dd>
<p>Add <em>directory</em> to the list of directories searched for require.</p>
</dd><dt><code>--multitask</code> (-m)
<dd>
<p>Treat all tasks as multitasks. (‘make/drake’ semantics)</p>
</dd><dt><code>--nosearch</code>  (-N)
<dd>
<p>Do not search for a Rakefile in parent directories.</p>
</dd><dt><code>--prereqs</code>  (-P)
<dd>
<p>Display a list of all tasks and their immediate prerequisites.</p>
</dd><dt><code>--quiet</code> (-q)
<dd>
<p>Do not echo commands from <a href="../../FileUtils.html"><code>FileUtils</code></a>.</p>
</dd><dt><code>--rakefile</code> <em>filename</em> (-f)
<dd>
<p>Use <em>filename</em> as the name of the rakefile. The default rakefile names are <code>rakefile</code> and <code>Rakefile</code> (with <code>rakefile</code> taking precedence). If the rakefile is not found in the current directory, <code>rake</code> will search parent directories for a match. The directory where the Rakefile is found will become the current directory for the actions executed in the Rakefile.</p>
</dd><dt><code>--rakelibdir</code> <em>rakelibdir</em> (-R)
<dd>
<p>Auto-import any .rake files in RAKELIBDIR. (default is ‘rakelib’)</p>
</dd><dt><code>--require</code> <em>name</em> (-r)
<dd>
<p>Require <em>name</em> before executing the Rakefile.</p>
</dd><dt><code>--rules</code>
<dd>
<p>Trace the rules resolution.</p>
</dd><dt><code>--silent (-s)</code>
<dd>
<p>Like –quiet, but also suppresses the ‘in directory’ announcement.</p>
</dd><dt><code>--suppress-backtrace <em>pattern</em> </code>
<dd>
<p>Line matching the regular expression <em>pattern</em> will be removed from the backtrace output. Note that the –backtrace option is the full backtrace without these lines suppressed.</p>
</dd><dt><code>--system</code> (-g)
<dd>
<p>Use the system wide (global) rakefiles. The project Rakefile is ignored. By default, the system wide rakefiles are used only if no project Rakefile is found. On Unix-like system, the system wide rake files are located in $HOME/.rake. On a windows system they are stored in $APPDATA/Rake.</p>
</dd><dt><code>--no-system</code> (-G)
<dd>
<p>Use the project level Rakefile, ignoring the system-wide (global) rakefiles.</p>
</dd><dt><code>--tasks</code> <em>pattern</em> (-T)
<dd>
<p>Display a list of the major tasks and their comments.  Comments are defined using the “desc” command.  If a pattern is given, then only tasks matching the pattern are displayed.</p>
</dd><dt><code>--trace</code>{=<em>output</em>} (-t)
<dd>
<p>Turn on invoke/execute tracing. Also enable full backtrace on errors. The <em>output</em> parameter is optional, but if specified it controls where the trace output is sent. If <em>output</em> is <code>stdout</code>, then trace output is directed to standard output. If <em>output</em> is <code>stderr</code>, or if it is missing, then trace output is sent to standard error.</p>
</dd><dt><code>--verbose</code> (-v)
<dd>
<p>Echo the Sys commands to standard output.</p>
</dd><dt><code>--version</code> (-V)
<dd>
<p>Display the program version and exit.</p>
</dd><dt><code>--where</code> <em>pattern</em> (-W)
<dd>
<p>Display tasks that match <em>pattern</em> and the file and line number where the task is defined. By default this option will display all tasks, not just the tasks that have descriptions.</p>
</dd><dt><code>--no-deprecation-warnings</code> (-X)
<dd>
<p>Do not display the deprecation warnings.</p>
</dd></dl>

<p>In addition, any command line option of the form <em>VAR</em>=<em>VALUE</em> will be added to the environment hash <code>ENV</code> and may be tested in the Rakefile.</p>

</main>

</div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

